/* eslint-disable */

import {fetchVideos} from "@/api/video";

const getDefaultState = () => {
  return {
    pageData: {}
  }
}

const state = getDefaultState()

const mutations = {
  SET_DATA: (state, tableData) => {
    state.pageData = tableData
  },
}

const actions = {

  // get user info
  async getvideos({commit, state}, data) {
    const response = await fetchVideos(data)
    console.log("获取视频信息：", response)
    if (!response) {
      return reject('获取失败')
    }
    commit('SET_DATA', response)
    return response
  },

}

export default {
  namespaced: true,//开启命名空间
  state,
  mutations,
  actions
}

